﻿/********************************************************************************************************************
* Author:	Aris Michail																							*
* Email:	std03055@di.uoa.gr																						*
* Purpose:	This script is used in order to create the stored procedure "usp_category_getattributes" that returns 	*
*			all the attributes from a category.																		*
********************************************************************************************************************/

CREATE PROCEDURE [dbo].[usp_category_getattributes]
	@categoryid bigint
AS
	SELECT Attributes.Name, Attributes.Type, Attributes.BestValue	/* get the attributes */
	FROM Attributes
	WHERE Attributes.Category = @categoryid

RETURN 0